function throttle(func, delay) {
  var prev = Date.now();
  return function () {
    var context = this;
    var args = arguments;
    var now = Date.now();
    if (now - prev >= delay) {
      func.apply(context, args);
      prev = Date.now();
    }
  }
}

function touchMove(e) {
  let pageY = e.touches[0].pageY
  let index = Math.floor((pageY - this.winOffsetY) / this.itemHeight)
  if (this.touchmoveIndex === index) {
    return false
  }
  let item = this.lists[index]
  if (item) {
    this.scrollViewId = 'uni-indexed-list-' + index
    this.touchmoveIndex = index

  }
}

export const throttleTouchMove = throttle(touchMove, 40)


export const alphaSelectMixin = {
  methods: {
  },
  computed: {
  },
  data() {
    return {

    }
  },
  mounted() {

  }
}
